<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:82:"/app/wwwroot/root/gongzi/public/../application/index/view/manage/address_book.html";i:1671875146;s:66:"/app/wwwroot/root/gongzi/application/index/view/layout/manage.html";i:1671875144;s:66:"/app/wwwroot/root/gongzi/application/index/view/common/script.html";i:1671875145;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head class="layui-layout-body">
    <meta charset="utf-8">
    <title><?php echo htmlentities($site['name']); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <link href="/assets/css/frontend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo htmlentities(\think\Config::get('site.version')); ?>" rel="stylesheet">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
    <script src="/assets/js/html5shiv.js"></script>
    <script src="/assets/js/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript">
        var require = {
            config: <?php echo json_encode($config); ?>
        };
    </script>
</head>
<body class="layui-layout-body" id="layer1">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-nav layui-layout-right">
            <div class="head_img"><img src="<?php echo cdnurl(htmlentities($user['avatar'])); ?>" alt=""/><?php echo $user['nickname']; ?></div>
        </div>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧垂直导航区域-->
            <div class="logo"><img src="/assets/manage/images/logo.png" width="64" height="64" alt=""/></div>
            <ul class="layui-nav nav">
                <?php if($auth->check('manage/index')): ?>
                <li class="layui-nav-item <?php echo check_navs_active('manage/index'); ?>">
                    <a href="<?php echo url('manage/index'); ?>"><i class="iconfont icon-shouye"></i>首页</a>
                </li>
                <?php endif; if($auth->check('manage/payslip_add')): ?>
                <li class="layui-nav-item <?php echo check_navs_active('manage/payslip_add'); ?>">
                    <a href="<?php echo url('manage/payslip_add'); ?>"><i class="iconfont icon-gongzitiao"></i>新增工资条</a>
                </li>
                <?php endif; if($auth->check('manage/index')): ?>
                <li class="layui-nav-item <?php echo check_navs_active('manage/payslip_list'); ?>">
                    <a href="<?php echo url('manage/payslip_list'); ?>"><i class="iconfont icon-fasongxiaoxi"></i>发送记录</a>
                </li>
                <?php endif; if($auth->check('manage/payslip_feedback')): ?>
                <li class="layui-nav-item <?php echo check_navs_active('manage/payslip_feedback'); ?>">
                    <a href="<?php echo url('manage/payslip_feedback'); ?>"><i class="iconfont icon-xinxi"></i>反馈查看</a>
                </li>
                <?php endif; if($auth->check('manage/payslip_settings')): ?>
                <li class="layui-nav-item <?php echo check_navs_active('manage/payslip_settings'); ?>">
                    <a href="<?php echo url('manage/payslip_settings'); ?>"><i class="iconfont icon-shezhi2"></i>发放设置</a>
                </li>
                <?php endif; if($auth->check('manage/address_book')): ?>
                <li class="layui-nav-item <?php echo check_navs_active('manage/address_book'); ?>">
                    <a href="<?php echo url('manage/address_book'); ?>"><i class="iconfont icon-bg-maillist"></i>通讯录</a>
                </li>
                <?php endif; ?>
            </ul>
        </div>
    </div>
    <div class="layui-body">
        <div class="content">
    <div class="layui-card txl">
        <div class="yg_left">
            <div class="title">部门信息 <span>共<?php echo $userCount; ?>个员工</span><a class="tb_but btn-sync"><i class="fa fa-refresh"></i> 同步信息</a></div>
            <div id="channeltree"></div>
        </div>
        <div class="yg_right">
            <div class="search_box">
                <form id="post-form" class="layui-form layui-clear" role="form" data-toggle="validator" method="POST" action="<?php echo url('manage/address_book'); ?>">
                    <div class="search_input">
                        <input type="hidden" name="page" value="1">
                        <input type="hidden" name="department_id" value="0">
                        <input type="text" name="nickname" placeholder="请输入员工姓名搜索…" class="layui-input">
                        <button type="submit" class="search_icon iconfont icon-sousuo"></button>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-inline">
                            <select name="status" lay-filter="status">
                                <option value="">请选择状态</option>
                                <option value="normal">正常</option>
                                <option value="hidden">锁定</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="layui-card-body">
                <table class="layui-table" lay-skin="line" lay-even="">
                    <thead>
                    <tr>
                        <th width="150">姓名</th>
                        <th>部门</th>
                        <th>职位</th>
                        <th>账号</th>
                        <th>状态</th>
                        <th>手机号</th>
                        <th width="180">操作</th>
                    </tr>
                    </thead>
                    <tbody class="lists">
                    </tbody>
                </table>
                <div id="laypage"></div>
            </div>
        </div>
    </div>
</div>

<div class="pop cz_pop">
    <div class="pop_content">
        <form id="reset-form" class="layui-form" role="form" data-toggle="validator" method="POST" action="<?php echo url('manage/changepwd'); ?>">
            <div class="layui-card-header">重置密码</div>
            <div class="close iconfont icon-guanbi"></div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <label class="layui-form-label">新密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="newpassword" placeholder="请输入新密码" data-rule="required;password" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">确认密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="renewpassword" placeholder="请再次输入新密码" data-rule="required;password" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="pop_but">
                <input type="hidden" name="uid" value="0">
                <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                <button type="submit" class="layui-btn layui-btn-determine">确定</button>
            </div>
        </form>
    </div>
</div>

<script type="text/html" id="list_tpl">
    <% for(i = 0; i < data.length; i ++) { %>
    <tr>
        <td>
            <div class="head_box">
                <div class="head_img"><img src="<%=data[i]['avatar']%>" alt=""/></div> <%=data[i]['nickname']%>
            </div>
        </td>
        <td><%=data[i]['department_name']%></td>
        <td><%=data[i]['position']%></td>
        <td><%=data[i]['username']%></td>
        <td>
            <div class="switch<% if (data[i]['status'] == 'normal') { %> active<% } %>"><div class="switch_handle"></div></div>
        </td>
        <td><%=data[i]['mobile']%></td>
        <td>
            <% if (data[i]['group_id'] == 1) { %>
            <a data-id="<%=data[i]['id']%>" data-value="2" class="switch_group">设为管理员</a>
            <% } else {%>
            <a data-id="<%=data[i]['id']%>" data-value="1" class="switch_group">取消管理员</a>
            <% } %>
            |
            <a data-id="<%=data[i]['id']%>" class="cz_but">重置手势密码</a>
        </td>
    </tr>
    <% } %>
</script>
    </div>
</div>
<link rel="stylesheet" href="/assets/manage/layui/css/layui.css">
<link rel="stylesheet" href="/assets/manage/css/css.css?v=<?php echo htmlentities(\think\Config::get('site.version')); ?>">
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_3789954_npmbld8fjlc.css">
<script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-frontend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
</body>
</html>